#!/bin/bash
#
# remote-mcs        Starts the Re-Mote Mote Control Server
#

# Source function library.
. /etc/init.d/functions

[ -f /sbin/remote-mcs ] || exit 0

RETVAL=0

umask 077

start() {
 	echo -n "Starting remote-mcs: "
	daemon remote-mcs --config-file=/etc/remote-mcs.cfg --daemonize=1
	RETVAL=$?
	return $RETVAL
}	
stop() {
	echo -n "Shutting down remote-mcs: "
	killproc remote-mcs
	RETVAL=$?
	return $RETVAL
}
rhstatus() {
	status remote-mcs
}
restart() {
	stop
	start
}	

case "$1" in
  start)
  	start
	;;
  stop)
  	stop
	;;
  status)
  	rhstatus
	;;
  restart|reload)
  	restart
	;;
  *)
	echo $"Usage: $0 {start|stop|status|restart}"
	exit 1
esac

exit $?

